# coding: utf-8
from application import db
from common.models.user import User


class AwardDetail(db.Model):
    __tablename__ = 'award_detail'

    id = db.Column(db.Integer, primary_key=True)

    name = db.Column(db.String(30, 'utf8mb4_0900_ai_ci') ,db.ForeignKey('user.id'))
    role = db.Column(db.String(30, 'utf8mb4_0900_ai_ci'))
    username = db.relationship('User', foreign_keys=name)

    detailraito = db.Column(db.Float)
    detailfund = db.Column(db.Float)
    nowfund = db.Column(db.Float)
    afterfund = db.Column(db.Float)

    projectid = db.Column(db.Integer)


